NOTE: This Technical Q&A has been retired. Please see the Technical Q&As page for current documentation.

Technical Q&A OPS12
Using PixPatHandle to Access the

Q How can I access the "Set Utilities Pattern" pattern? (This pattern is set by holding down the option key in the Desktop Patterns Control Panel.)

A This control panel uses resources of type 'ppat' to store this pattern. The `ppat' resource is stored in the System file in your System Folder; the desktop pattern has an ID of 16 and the utilities pattern has an ID of 42. Since this is not documented, it could be subject to change at any moment. You should be careful when using this.

A snippet of code is included here to show you how you can get to these two `ppat' resources.

 PixPatHandle ppatHandle;

      ppatHandle = (PixPatHandle) GetPixPat(42);
      if (ppatHandle != NULL) {
          SetRect(&destRect;, 15, 125, 197, 164);
          FrameRect(&destRect;);
          FillCRect(&destRect;, ppatHandle);
          DisposePixPat(ppatHandle);
      }
Note:
You can just use GetPixPat to access a `ppat' resource -- the additional code just shows how to draw with it and dispose of it when done.

Updated: 27-September-96


Developer Documentation | Technical Notes | Development Kits | Sample Code